package com.zhuozhengsoft.springbootpageoffice.controller;

import com.zhuozhengsoft.pageoffice.PDFCtrl;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping(value = "/PDFSearch")
public class PDFSearchController {
    @RequestMapping(value = "/PDF")
    public ModelAndView showWord(HttpServletRequest request) {
        PDFCtrl pdfCtrl1 = new PDFCtrl(request);
        pdfCtrl1.webOpen("/doc/PDFSearch/test.pdf");
        request.setAttribute("pageoffice", pdfCtrl1.getHtml());
        ModelAndView mv = new ModelAndView("PDFSearch/PDF");
        return mv;
    }


}
